package com.atguigu.luachangeUTF8;
import java.lang.*;
import java.util.*;
public class test2 {



        public static void main(String[] args){
            String str = new Scanner(System.in).next();
            char[] chars = str.toCharArray();
            boolean b = false;

            for(int i = 0; i<chars.length;i++){
                if(chars[i] == '"'  ){
                    for (int j = i+1 ; j<chars.length ; j++ ){
                        if(chars[j] == '"'  )
                            b = true;
                    }

                }
                else if (chars[i] == '{') {
                    for (int j = i+1 ; j<chars.length ; j++ ){
                        if(chars[j] == '}'  )
                            b = true;
                    }
                }
                else if (chars[i] == '['){
                    for (int j = i+1 ; j<chars.length ; j++ ){
                        if(chars[j] == ']'  )
                            b = true;
                    }
                }else
                    b = false;
            }


            System.out.println(b);



        }
    }

